function terms = splitStringToCells(s)
s = strtrim(s);
w = isspace(s);            
if any(w)
% decide the positions of terms        
dw = diff(w);
sp = [1, find(dw == -1) + 1];     % start positions of terms
ep = [find(dw == 1), length(s)];  % end positions of terms

% extract the terms        
nt = numel(sp);
terms = cell(1, nt);
for i = 1 : nt
    terms{i} = s(sp(i):ep(i));
end                
else
    terms = {s};
end